//
//  WCG_N_ProviderDetailItemViewController.m
//  Project_B
//
//  Created by apple on 15/11/26.
//  Copyright © 2015年 Atom_Wang. All rights reserved.
//

#import "WCG_N_ProviderDetailItemViewController.h"
#import "UMSocial.h"
#import "GXProviderDetailModel.h"

@interface WCG_N_ProviderDetailItemViewController () <UIWebViewDelegate, UMSocialUIDelegate>

@end

@implementation WCG_N_ProviderDetailItemViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    [self.view setBackgroundColor:[UIColor whiteColor]];
    [self createWebViewWithFrame:self.view.bounds URL:[NSURL URLWithString:self.providerModel.item_url]];
    self.webView.delegate = self;
    
    [self createButtomLikeButton];
    
    [self.backBtn addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    self.likeBtn.hidden = YES;
    self.repostBtn.hidden = YES;
}

#pragma mark - 按钮响应方法
- (void)buttonAction:(UIButton *)btn {
    //回退按钮
    if (btn == self.backBtn) {
        [self.navigationController popViewControllerAnimated:YES];
    }
}


- (void)webViewDidStartLoad:(UIWebView *)webView {
    NSLog(@"开始加载");
}

- (void)webViewDidFinishLoad:(UIWebView *)webView {
    NSLog(@"结束加载");
}

- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error {
    NSLog(@"%@", error);
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
